import request from "@/utils/request";
import { CURDApiBase } from "../curd-api-base";

export default new (class ScreenApi extends CURDApiBase {
  constructor() {
    super("/wms-order/api/screen/kgg");
  }

  /** 年度设备出库统计 */
  yearOutbound(data) {
    return request({
      url: `${this.baseUrl}/yearOutbound`,
      method: "post",
      data,
    });
  }

  /** 月度开关柜产量 */
  monthOutbound(data) {
    return request({
      url: `${this.baseUrl}/monthOutbound`,
      method: "post",
      data,
    });
  }

  /** 库存预警 */
  inventoryAlarm(data?: any) {
    return request({
      url: `${this.baseUrl}/inventoryAlarm`,
      method: "post",
      data,
    });
  }

  /** 未到货预警 */
  notDelivered(data?: any) {
    return request({
      url: `${this.baseUrl}/notDelivered`,
      method: "post",
      data,
    });
  }

  /** 	当日入库记录 */
  importGoods(data?: any) {
    return request({
      url: `${this.baseUrl}/importGoods`,
      method: "post",
      data,
    });
  }

  /** 	当日出库记录 */
  exportGoods(data?: any) {
    return request({
      url: `${this.baseUrl}/exportGoods`,
      method: "post",
      data,
    });
  }

  /**月度成品入库统计 */
  productWarehousing(data?: any) {
    return request({
      url: `${this.baseUrl}/productWarehousing`,
      method: "post",
      data,
    });
  }

  /**月度销量 */
  monthDelivery(data?: any) {
    return request({
      url: `${this.baseUrl}/monthDelivery`,
      method: "post",
      data,
    });
  }

  /**月度项目完成度 */
  monthProjectPercent(data?: any) {
    return request({
      url: `${this.baseUrl}/monthProjectPercent`,
      method: "post",
      data,
    });
  }

  // /** 导入物料清单 */
  // uploadMultiple(data?: any) {
  //   return request({
  //     headers: {
  //       'content-Type': 'multipart/form-data'
  //     },
  //     url: `${this.baseUrl}/import_multiple`,
  //     method: 'post',
  //     data
  //   })
  // }

  // /** 导入请购单 */
  // upload(data?: any) {
  //   return request({
  //     headers: {
  //       'content-Type': 'multipart/form-data'
  //     },
  //     url: `${this.baseUrl}/import`,
  //     method: 'post',
  //     data
  //   })
  // }

  // /**导入清单后保存 */
  // batchSave(data: any): any {
  //   return request({
  //     url: `${this.baseUrl}/batchSave`,
  //     method: 'post',
  //     data
  //   })
  // }

  // /** 查询项目是否到货 */
  // clacAllRequire() {
  //   return request({
  //     url: `${this.baseUrl}/compareAllRequire`,
  //     method: 'post'
  //   })
  // }
})();
